//package com.lwl.servlet;
//
//import java.io.IOException;
//import java.io.PrintWriter;
//
//import javax.servlet.ServletException;
//import javax.servlet.http.HttpServlet;
//import javax.servlet.http.HttpServletRequest;
//import javax.servlet.http.HttpServletResponse;
//
///**
// * Servlet implementation class TestServlet
// */
//public class TestServlet extends HttpServlet {
//	private static final long serialVersionUID = 1L;
//
//    /**
//     * Default constructor. 
//     */
//    public TestServlet() {
//        // TODO Auto-generated constructor stub
//    }
//
//	/**
//	 * @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse response)
//	 */
//	protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
//		this.doPost(request, response);
//	}
//
//	/**
//	 * @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse response)
//	 */
//	protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
//		String name = request.getParameter("name");
//		System.out.println("The thread name:"+name);
//		PrintWriter out = response.getWriter();
//		
//		long start = System.currentTimeMillis();
//    	
//    	
//		try {
//			synchronized (out) {
//				out.wait(3000);
//			}
//			
////			// ��ʱ����
////	    	if(System.currentTimeMillis()-start>=3000)
////		    	out.write("time out,The "+name+" response fail.");
////	    	else
//			long end = System.currentTimeMillis() - start;
//			
//			
//	    	out.write("The "+name+" response succ.used  time:"+ end);
//			
//		} catch (InterruptedException e) {
//			e.printStackTrace();
//		}finally{
//			out.close();
//		}
//	}
//}